package main

import (
	"fmt"

	"gitee.com/bluesky2006/terminal/pkg/config"
	"gitee.com/bluesky2006/terminal/pkg/i18n"
	"gitee.com/bluesky2006/terminal/pkg/logger"
	"gitee.com/bluesky2006/terminal/pkg/model"
	"gitee.com/bluesky2006/terminal/pkg/proxy"
)

var user = model.User{
	ID:       "dbcf553f-7a96-4342-9939-c485231eb13e",
	Name:     "zouweiadmin",
	Username: "admin",
	Email:    "xx@qq.com",
	Role:     "Admin",
	IsValid:  false,
	IsActive: false,
	OTPLevel: 0,
}
var protocols = []string{"ssh/22"}

var asset = model.Asset{
	ID:        "41f7c1ae-8ec5-453e-a2ca-da7d30edc677",
	Hostname:  "hadoop101",
	IP:        "hadoop101",
	Os:        "CentOS",
	Domain:    "",
	Comment:   "",
	Protocols: protocols,
	OrgID:     "",
	OrgName:   "DEFAULT",
	Platform:  "linux",
}

var systemuser = model.SystemUser{
	ID:                   "",
	Name:                 "zouw",
	Username:             "zouw",
	Priority:             20,
	Protocol:             "ssh",
	Comment:              "",
	LoginMode:            "auto",
	Password:             "sa",
	PrivateKey:           "",
	SftpRoot:             "tmp",
	OrgId:                "",
	OrgName:              "",
	UsernameSameWithUser: false,
	Actions:              nil,
}

var ps = proxy.ProxyServer{
	User:       &user,
	Asset:      &asset,
	UserConn:   nil,
	SystemUser: &systemuser,
}

func main() {
	config.Initial("./config.yml")
	i18n.Initial()
	logger.Initial()
	_, err := ps.GetSSHConn1()
	if err != nil {
		fmt.Println("ERROR", err)
	}
	fmt.Println("---END---")
}
